<?php

declare(strict_types=1);

namespace App\Amqp\Consumer;

use Hyperf\Amqp\Result;
use Hyperf\Amqp\Annotation\Consumer;
use Hyperf\Amqp\Message\ConsumerMessage;
use PhpAmqpLib\Message\AMQPMessage;

/**
 * @Consumer(exchange="sms-dlx-send", routingKey="sms-dlx-send", queue="sms-dlx-send", name ="SMSSendConsumer", nums=1)
 */
class SMSSendConsumer extends ConsumerMessage
{
    public function consumeMessage($data, AMQPMessage $message): string
    {
        echo "date:".date('Y-m-d H:i:s');
        var_dump("get msg:".json_encode($data));
        return Result::ACK;
    }
}
